package main

import "fmt"

func main() {
	//var x = [6]int{2, 3, 4, 5, 6}
	//var x = [...]int{
	//	2, 3, 4, 5, 6, 7, 8, 9,
	//}

	//slice
	//	var x = make([]float64, 5)
	//
	//	var y = make([]float64, 5, 10)
	//	fmt.Println(len(x), cap(x))
	//	fmt.Println(len(y), cap(y))
	//
	//	for i := 0; i < len(x); i++ {
	//		x[i] = 0
	//	}
	//
	//	for i := 0; i < 6; i++ {
	//		y[i] = 0
	//	}

	//var x = make([]int, 5, 10)
	//for i := 0; i < len(x); i++ {
	//	x[i] = i
	//}

	//fmt.Println(x)
	//x = append(x, 1, 2, 3, 4, 5, 6, 7)
	//	var x = make([]int, 1, 2)
	//
	//	fmt.Println(x, len(x), cap(x))
	//	x = append(x, 1, 2, 3)
	//	x = append(x, 1)
	//var x = []int{1, 2, 3, 4, 5, 6, 7}
	//var y = make([]int, 5, 10)
	//copy(y, x)
	var x = map[string]string{
		"name":  "li",
		"age":   "20",
		"color": "red",
	}

	for key, value := range x {
		fmt.Println("key:", key, "value:", value)
	}
}
